﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using EasyToHelp.Entity;
using EasyToHelp.Service;

namespace EasyToHelp.WEBAPI.Controllers
{
    public class MarketController : BaseController
    {
        private readonly IMarketService Market;
        public MarketController(IMarketService _Market)
        {
            Market = _Market;
        }
        public object MarketDo(Market model,string action)
        {
            switch (action)
            {
                case "Add":
                  return  Market.Add(model);
                case "Update":
                    return Market.Update(model);
                case "Delete":
                    return Market.Delete(model);
                case "GetList":
                    return Market.GetList();
            }
            return null;
        }
    }
}